Conversation
Detect and correctly convert MongoDB Binary or Uint8Array values for transaction.hash, transaction.id, and inputs.originalTransactionId instead of assuming Uint8Array. Removes unused toBase64 import and adds conditional branches that use toHex for Uint8Array or .toString('hex') for Binary to avoid runtime errors when documents store Binary values. Small refactor to introduce local variables for clarity.
Remove the enableVerification boolean from TransactionFactory (and corresponding argument usage) to simplify construction. Update IMempoolTransaction: replace boolean isOPNet with transactionType: OPNetTransactionTypes, add optional from: Address, and import required types. Adjust BitcoinTransactionVerificatorV2 to set transaction.transactionType, assign gas/priority fields, and populate the from property for Interaction transactions via insertInteractionProperty. Also includes minor import/formatting cleanup.
Replace the old isOPNet boolean with a transactionType enum and add OPNet-specific optional fields (theoreticalGasLimit, priorityFee, from, contractAddress, calldata, bytecode). Updated protobuf, JSON-RPC types, DB interfaces, repository conversions, and indexes to store and query transactionType and OPNet fields. Adjusted mempool, broadcast, and websocket flows to propagate transactionType (defaulting to Generic for non-OPNet txs). Enhanced the Bitcoin transaction verificator to decode OPNet transactions and populate shared/interaction/deployment properties. Also added .serena/ to .gitignore.
Run code-style/formatting pass across the codebase. Changes include reflowing long lines, normalizing import blocks, consistent ternary and object formatting, wrapping function arguments, and standardizing quotes in OpenAPI examples. Numerous files across API routes, websocket handlers, blockchain indexer, RPC types and VM/storage were touched; these are stylistic only and do not change runtime behavior.
Remove legacy BECH32 and BASE58 config types and related parsing/verification from config interfaces, BtcIndexerConfig and BtcIndexerConfigLoader. Update numerous default settings to new operational values: disable DOCS by default, enable INDEXER, tighten ALLOW_PURGE, raise UTXO save interval and start height, flip several DEV debug flags, enable POC, adjust P2P port and peer timeout, increase API threads and pending limits, raise transaction broadcast and pending call capacities, increase UTXO limit, change RPC concurrency, tweak OP_NET thresholds/prefetch/light-mode start, and other minor numeric formatting changes. Also update RoswellConsensus activation block to a much larger value (1_000_000_000n). These changes simplify config surface area and tune runtime defaults for current deployment/testing needs.
Remove the deprecated/unused ENABLED_AT_BLOCK setting from OP_NET across config samples, tests, autoconfig script, and the default in BtcIndexerConfigLoader. Files updated: docker/config/btc.conf.example, src/config/btc.sample.conf, tests/config/btc.unit.test.conf, tools/autoconfig.sh, and src/src/config/BtcIndexerConfigLoader.ts. This reduces duplicated/deprecated defaults and clarifies that OP_NET behavior is controlled by MODE/REINDEX and related settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replace the old isOPNet boolean with a transactionType enum and add OPNet-specific optional fields (theoreticalGasLimit, priorityFee, from, contractAddress, calldata, bytecode). Updated protobuf, JSON-RPC types, DB interfaces, repository conversions, and indexes to store and query transactionType and OPNet fields. Adjusted mempool, broadcast, and websocket flows to propagate transactionType (defaulting to Generic for non-OPNet txs). Enhanced the Bitcoin transaction verificator to decode OPNet transactions and populate shared/interaction/deployment properties. Also added .serena/ to .gitignore.
Type of Change
Checklist
Build & Tests
npm installcompletes without errorsnpm run buildcompletes without errorsnpm testpasses all testsCode Quality
Documentation
Security
OPNet Node Specific
Testing
Consensus Impact
Related Issues
By submitting this PR, I confirm that my contribution is made under the terms of the project's license.